<template>
  <a @click="handleChange" type="text" :class="['sider-trigger-a', collapsed ? 'collapsed' : 'collapsedOpen']">
    <img class="toggleOff" v-if="collapsed"  src="../../../../../assets/images/off.png">
    <img class="toggleOpen" v-else src="../../../../../assets/images/open.png">
  </a>
</template>
<script>
export default {
  name: 'siderTrigger',
  props: {
    collapsed: Boolean,
    icon: {
      type: String,
      default: 'navicon-round'
    },
    size: {
      type: Number,
      default: 26
    }
  },
  methods: {
    handleChange () {
      this.$emit('on-change', !this.collapsed)
    }
  }
}
</script>
<style lang="less" scope>
@import './sider-trigger.less';
.toggleOff,.toggleOpen{
  width:17px;
}
.toggleOpen{
  float:right;
}
</style>
